import request from '@/utils/request'

// 查询实验室工作人员列表
export function listEmployee(query) {
  return request({
    url: '/labdata/employee/list',
    method: 'get',
    params: query
  })
}

export function sendVerifyCode(employeeNo){
  return request({
    url: '/labdata/employee/sendCode/'+employeeNo,
    method: 'get'
  })
}
//verifyCode
export function verifyCode(employeeNo, code){
  return request({
    url: '/labdata/employee/verifyCode/'+employeeNo+'/'+code,
    method: 'get'
  })
}

//query
export function queryUser(query) {
  return request({
    url: '/labdata/employee/query',
    method: 'get',
    params: query
  })
}
export function queryEmployee(query) {
  return request({
    url: '/labdata/employee/queryEmployee',
    method: 'get',
    params: query
  })
}
///getCheckedList
export function getCheckedList(query) {
  return request({
    url: '/labdata/employee/getCheckedList',
    method: 'get',
    params: query
  })
}
// 查询实验室工作人员详细
export function getEmployee(orgKindId, employeeId) {
  return request({
    url: '/labdata/employee/' + orgKindId + '/' +(employeeId?employeeId:'0'),
    method: 'get'
  })
}
///search/{employeeNo}
export function searchEmployee(employeeNo) {
  return request({
    url: '/labdata/employee/search/' + employeeNo,
    method: 'get'
  })
}

//self
export function getloginInfo() {
  return request({
    url: '/labdata/employee/loginInfo',
    method: 'get'
  })
}
// 新增实验室工作人员
export function addEmployee(data) {
  return request({
    url: '/labdata/employee',
    method: 'post',
    data: data
  })
}

// 修改实验室工作人员
export function updateEmployee(data) {
  return request({
    url: '/labdata/employee',
    method: 'put',
    data: data
  })
}

// 删除实验室工作人员
export function delEmployee(employeeId) {
  return request({
    url: '/labdata/employee/' + employeeId,
    method: 'delete'
  })
}

// 导出实验室工作人员
export function exportEmployee(query) {
  return request({
    url: '/labdata/employee/export',
    method: 'get',
    params: query
  })
}

  //当前登录人的信息
export function getEmployeeInfo(employeeNo) {
  return request({
    url: '/labdata/employee/getEmployeeInfo/' + employeeNo,
    method: 'get'
  })
}
